#include<stdio.h>
int main(void)
{
	int n,count,number,a[300]={0},i;
	scanf("%d",&n);
	a[0]=1;
	for(number=2,count=1;count<n;number++)
	{
		for(i=0;i<=count;i++)
		{
			if((number==a[i]*2+1)||(number==a[i]*3+1))
			{
				a[count++]=number;
				break;
			}
		}
	}
	for(i=0;i<n;i++)
	{
		printf("%d",a[i]);
		if(i!=n-1)printf(" ");
	}
	return 0;
}
